﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace PresentItNow
{
    public class OperationModeConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (!(value is OperationMode))
                return null;

            OperationMode mode = (OperationMode)value;

            string text = "Unknown mode: " + mode;
            switch (mode)
            {
                case OperationMode.Start:
                    text = "Start";
                    break;
                case OperationMode.Client_Disconnected:
                    text = "View Mode - Enter IP";
                    break;
                case OperationMode.Client_Connected:
                    text = "View Mode - Viewing";
                    break;
                case OperationMode.Host:
                    text = "Presenting";
                    break;
                default:
                    break;
            }

            return text;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
